package com.sky.edumanageapi.chapter.service.impl;

import com.sky.edumanageapi.chapter.mapper.ChapterMapper;
import com.sky.edumanageapi.chapter.pojo.vo.ChapterVO;
import com.sky.edumanageapi.chapter.service.ChapterService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class ChapterServiceImpl implements ChapterService {
    @Autowired
    private ChapterMapper chapterMapper;
    @Override
    public List<ChapterVO> getChapter(Integer courseId) {
        log.debug("获取课程章节业务：{}", courseId);
        List<ChapterVO> list = chapterMapper.getByCourseId(courseId);
        return list;
    }
}
